home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 June / Macworld (1999-06).dmg / Shareware World / Graphics / Ink_FineArt 3D / Installer / Installer.dxr / 00036.ls < prev    next >
Encoding:
Text File  |  1999-02-18  |  2.0 KB  |  75 lines

  1. on startMovie
  2.   global gForceCleanInstall, gInstalLib, kInstallLibraryPath
  3.   set gForceCleanInstall to 0
  4.   set kInstallLibraryPath to ":files:InstallerLib"
  5.   OpenLibrary(kInstallLibraryPath)
  6.   put EMPTY into field "ProgressInfo"
  7.   set the scrollTop of member "SoftLicense" to 1
  8.   set the exitLock to 1
  9.   set the keyDownScript to "checkKey"
  10. end
  11.  
  12. on stopMovie
  13.   global kInstallLibraryPath
  14.   put EMPTY into field "ProgressInfo"
  15.   CloseLibrary(kInstallLibraryPath)
  16. end
  17.  
  18. on checkKey
  19.   if the commandDown and (the key = "q") then
  20.     nothing()
  21.   end if
  22. end
  23.  
  24. on OpenLibrary libPathName
  25.   global gInstalLib
  26.   openXLib(libPathName)
  27.   OSRegister(1017782846, 2044049700)
  28. end
  29.  
  30. on CloseLibrary libPathName
  31.   global gInstalLib
  32.   set gInstalLib to 0
  33.   closeXLib(libPathName)
  34. end
  35.  
  36. on DoInstallAll
  37.   global gForceCleanInstall
  38.   set kExtensionFolderType to "extn"
  39.   set kPreferencesFolderType to "pref"
  40.   set kSrcFolder to ":files:"
  41.   set kFileName to "Inklination FineArt 3D"
  42.   set kPrefFileName to "Inklination FA3D Prefs"
  43.   set extFolder to OSSpecialPath(kExtensionFolderType)
  44.   DeleteExisting(extFolder, kFileName)
  45.   InstallFile(kSrcFolder, extFolder, kFileName)
  46.   if gForceCleanInstall then
  47.     set prefFolder to OSSpecialPath(kPreferencesFolderType)
  48.     DeleteExisting(prefFolder, kPrefFileName)
  49.   end if
  50. end
  51.  
  52. on DeleteExisting folderPath, fileName
  53.   set path to FormatFolderPath(folderPath)
  54.   set path to path & fileName
  55.   set result to OSDelete(path)
  56. end
  57.  
  58. on InstallFile srcFolder, dstFolder, fileName
  59.   set SrcPath to FormatFolderPath(srcFolder)
  60.   set SrcPath to SrcPath & fileName
  61.   set DstPath to FormatFolderPath(dstFolder)
  62.   set DstPath to DstPath & fileName
  63.   set result to OSFileCopy(SrcPath, DstPath)
  64.   put "    ‚Ä¢ Inklination FineArt 3D in the Extensions folder" & RETURN after field "ProgressInfo"
  65. end
  66.  
  67. on FormatFolderPath folderPath
  68.   if folderPath <> EMPTY then
  69.     if the last char in folderPath <> ":" then
  70.       set folderPath to folderPath & ":"
  71.     end if
  72.   end if
  73.   return folderPath
  74. end
  75.